/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.domain.vo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.comac.ins.isfd.domain.IsfdDatabaseModelConfigField;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;


/**
 * 数据库建模配置字段视图对象 isfd_database_model_config_fields
 *
 * @author lj
 * @date 2025-01-16
 */
@Data
@AutoMapper(target = IsfdDatabaseModelConfigField.class)
public class IsfdDatabaseModelConfigFieldVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 模型ID
     */
    private Long modelId;

    /**
     * 字段名称
     */
    private String fieldName;

    /**
     * 字段中文名称
     */
    private String fieldChineseName;


    /**
     * 父字段ID
     */
    private Long parentFieldId;

    /**
     * 字段描述
     */
    private String fieldDescription;

    /**
     * 字段类型
     */
    private String fieldType;

    /**
     * 字段结构
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<IsfdDatabaseModelConfigFieldVo> fieldList;

    /**
     * 默认值
     */
    private String defaultValue;

    /**
     * 是否允许为空
     */
    private Integer isNullable;

    /**
     * 是否是唯一键
     */
    private Integer isUnique;

    /**
     * 是否是关键字段
     */
    private Integer isKeyField;

    /**
     * 是否已关联
     */
    private Integer isRelated;

    /**
     * 关联模型ID
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long relatedModelId;

    /**
     * 是否是树展示字段
     */
    private Integer isTreeDisplayField;
}
